package com.abvnet.project.water.project.service;

import com.abvnet.common.utils.text.Convert;
import com.abvnet.project.water.project.domain.ProjectCustomerLog;
import com.abvnet.project.water.project.mapper.ProjectCustomerLogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 客户日志 服务层实现
 * 
 * @author duj
 * @date 2019-08-17
 */
@Service
public class ProjectCustomerLogServiceImpl implements IProjectCustomerLogService {
	@Autowired
	private ProjectCustomerLogMapper projectCustomerLogMapper;

	/**
     * 查询客户日志信息
     * 
     * @param customerLogId 客户日志ID
     * @return 客户日志信息
     */
    @Override
	public ProjectCustomerLog selectProjectCustomerLogById(Long customerLogId) {
	    return projectCustomerLogMapper.selectProjectCustomerLogById(customerLogId);
	}
	
	/**
     * 查询客户日志列表
     * 
     * @param projectCustomerLog 客户日志信息
     * @return 客户日志集合
     */
	@Override
	public List<ProjectCustomerLog> selectProjectCustomerLogList(ProjectCustomerLog projectCustomerLog) {
	    return projectCustomerLogMapper.selectProjectCustomerLogList(projectCustomerLog);
	}

    @Override
    public List<ProjectCustomerLog> selectProjectCustomerLogListForApi(ProjectCustomerLog projectCustomerLog) {
        return projectCustomerLogMapper.selectProjectCustomerLogListForApi(projectCustomerLog);
    }

    /**
     * 新增客户日志
     * 
     * @param projectCustomerLog 客户日志信息
     * @return 结果
     */
	@Override
	public int insertProjectCustomerLog(ProjectCustomerLog projectCustomerLog) {
	    return projectCustomerLogMapper.insertProjectCustomerLog(projectCustomerLog);
	}
	
	/**
     * 修改客户日志
     * 
     * @param projectCustomerLog 客户日志信息
     * @return 结果
     */
	@Override
	public int updateProjectCustomerLog(ProjectCustomerLog projectCustomerLog) {
	    return projectCustomerLogMapper.updateProjectCustomerLog(projectCustomerLog);
	}

	/**
     * 删除客户日志对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteProjectCustomerLogByIds(String ids) {
		return projectCustomerLogMapper.deleteProjectCustomerLogByIds(Convert.toStrArray(ids));
	}
	
}